<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%
	pageContext.setAttribute("APP_PATH", request.getContextPath());
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>被询问人历史信息查询</title>
<link href="${APP_PATH}/static2/css/style.css" rel="stylesheet" type="text/css" />
<link href="${APP_PATH}/static2/css/xilaxuanze.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${APP_PATH}/static2/js/jquery.js"></script>
<script src="${APP_PATH}/static2/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<link href="${APP_PATH}/static2/jquery-jbox/2.3/Skins/Bootstrap/jbox.min.css" rel="stylesheet"/>
<script src="${APP_PATH}/static2/jquery-jbox/2.3/jquery.jBox-2.3.min.js" type="text/javascript"></script>

<script type="text/javascript">
	$(function() {
		//移到右边
		$('#add').click(function() {
			//先判断是否有选中
			if (!$("#select1 option").is(":selected")) {
				alert("请选择需要移动的选项")
			}
			//获取选中的选项，删除并追加给对方
			else {
				$('#select1 option:selected').appendTo('#select2');
			}
		});

		//移到左边
		$('#remove').click(function() {
			//先判断是否有选中
			if (!$("#select2 option").is(":selected")) {
				alert("请选择需要移动的选项")
			} else {
				$('#select2 option:selected').appendTo('#select1');
			}
		});

		//全部移到右边
		$('#add_all').click(function() {
			//获取全部的选项,删除并追加给对方
			$('#select1 option').appendTo('#select2');
		});

		//全部移到左边
		$('#remove_all').click(function() {
			$('#select2 option').appendTo('#select1');
		});

		//双击选项
		$('#select1').dblclick(function() { //绑定双击事件
			//获取全部的选项,删除并追加给对方
			$("option:selected", this).appendTo('#select2'); //追加给对方
		});

		//双击选项
		$('#select2').dblclick(function() {
			$("option:selected", this).appendTo('#select1');
		});

	});
</script>

<script>
	$(function() {
		//全选或全不选
		$("#all").click(function() {
			if (this.checked) {
				$("#list :checkbox").prop("checked", true);
			} else {
				$("#list :checkbox").prop("checked", false);
			}
		});
		//全选  
		$("#selectAll").click(function() {
			$("#list :checkbox,#all").prop("checked", true);
		});
		//全不选
		$("#unSelect").click(function() {
			$("#list :checkbox,#all").prop("checked", false);
		});
		//反选 
		$("#reverse").click(function() {
			$("#list :checkbox").each(function() {
				$(this).prop("checked", !$(this).prop("checked"));
			});
			allchk();
		});

		//设置全选复选框
		$("#list :checkbox").click(function() {
			allchk();
		});

		//获取选中选项的值
		$("#getValue").click(function() {
			var valArr = new Array;
			$("#list :checkbox[checked]").each(function(i) {
				valArr[i] = $(this).val();
			});
			var vals = valArr.join(',');
			alert(vals);
		});
	});
	function allchk() {
		var chknum = $("#list :checkbox").size();//选项总个数
		var chk = 0;
		$("#list :checkbox").each(function() {
			if ($(this).prop("checked") == true) {
				chk++;
			}
		});
		if (chknum == chk) {//全选
			$("#all").prop("checked", true);
		} else {//不全选
			$("#all").prop("checked", false);
		}
	}
</script>
<script>
	$(function() {
		$("#shanchu").click(function() {
			$("input[name='test']:checked").each(function() { // 遍历选中的checkbox
				n = $(this).parents("tr").index(); // 获取checkbox所在行的顺序
				$("table#list").find("tr:eq(" + n + ")").remove();
			});
		});
	});
</script>




<script type="text/javascript">
	$(document).ready(function() {
		$(".btnxx").click(function() {
			$(".tipyuanxx").fadeIn(200);
		});

		$(".tiptop a").click(function() {
			$(".tipyuanxx").fadeOut(200);
		});

		$(".sure").click(function() {
			$(".tipyuanxx").fadeOut(100);
		});

		$(".cancel").click(function() {
			$(".tipyuanxx").fadeOut(100);
		});
		//双击行（tr）,弹出修改按钮
		$("#list tr").dblclick(function(){
			//获取双击行的checkbox的dataID
			var checkboxObj=$(this).find("input:checkbox[name='suspectCheckbox']");
			var suspectId=checkboxObj.attr("dataId");
			//alert(policeId)
			//$("#suspectUpdateModal form")[0].reset();
			showSuspectInfoDetail(suspectId);
			//$("#suspectInfo_upodate_btn").attr("dataId",suspectId);
			//$("#suspectUpdateModal").fadeIn(200);
		});
		// //翻页
		var pageInfoJson=${pageInfoJson};
		build_page_nav(pageInfoJson);

	});
	//翻页开始
	function to_page(n) {
		$("#pageNo").val(n);
		$("#searchForm").submit();
		return false;
	}
	function build_page_nav(pageInfo) {
		//$("#page_info_nav").empty();
		totalrecord = pageInfo.pages;
		var ul = $("#pageInfoId");
		ul.empty();
		var firstPageLi = $("<li></li>").addClass("paginItem").append(
				$("<a ></a>").append("首页").attr("href", "javascript:;"));
		var prePageLi = $("<li></li>").addClass("paginItem").append(
				$("<a href='javascript:;'></a>").append("&laquo;"));
		if (pageInfo.hasPreviousPage == false) {
			firstPageLi.addClass("disabled");
			prePageLi.addClass("disabled");
		} else {
			firstPageLi.click(function() {
				to_page(1);
			});
			prePageLi.click(function() {
				to_page(pageInfo.pageNum - 1);
			});
		}

		var nextPageLi = $("<li></li>").addClass("paginItem").append(
				$("<a href='javascript:;'></a>").append("&raquo;"));
		var lastPageLi = $("<li></li>").addClass("paginItem")
				.append(
						$("<a href='javascript:;'></a>").append("尾页").attr(
								"href", "#"));
		if (pageInfo.hasNextPage == false) {
			nextPageLi.addClass("disabled");
			lastPageLi.addClass("disabled");
		} else {
			nextPageLi.click(function() {
				to_page(pageInfo.pageNum + 1);
			});
			lastPageLi.click(function() {
				to_page(pageInfo.pages);
			});
		}

		ul.append(firstPageLi).append(prePageLi);
		$.each(pageInfo.navigatepageNums, function(index, item) {
			var numLi = $("<li></li>").addClass("paginItem").append(
					$("<a href='javascript:;'></a>").append(item));
			if (pageInfo.pageNum == item) {
				numLi.addClass("current");
			}
			numLi.click(function() {
				to_page(item);
			});
			ul.append(numLi);
		});
		ul.append(nextPageLi).append(lastPageLi);
		ul.appendTo("#page_info_nav");
	}
	//翻页结束
	//查看详情
	function showSuspectInfoDetail(id){
		$("#suspectDetailModal form")[0].reset();
		$.ajax({
			url:"${APP_PATH}/per/suspectInfo/getSuspectInfo?infoGUID="+id,
			type:"get",
			success:function(result){
				$("#suspectName_update_input").val(result.suspectName);
				$("#suspectSex_update_input").val(result.suspectSex);
				$("#suspectBirth_update_input").val(result.suspectBirth);
				$("#suspectIDNo_update_input").val(result.suspectIDNo);
				$("#suspectAddress_update_input").val(result.suspectAddress);
				$("#suspectDegree_update_input").val(result.suspectDegree);
				$("#suspectNationality_update_input").val(result.suspectNationality);
				$("#suspectPlace_update_input").val(result.suspectPlace);
				$("#cardNo1_update_input").val(result.cardNo1);
				$("#bringPolice_update_input").val(result.leaveBringName);
				
				$("#suspectTel_update_input").val(result.suspectTel);
				$("#suspectArea_update_input").val(result.suspectArea);
				$("#suspectStature_update_input").val(result.suspectStature);
				$("#facelFeature_update_input").val(result.facelFeature);
				$("#shapelFeature_update_input").val(result.shapelFeature);
				$("#bloodType_update_input").val(result.bloodType);
				$("#specialFeature_update_input").val(result.specialFeature);
				$("#supspocious_update_input").val(result.supspocious);
				$("#suspectRemark_update_input").val(result.suspectRemark);
				
				//
				$("#inTime_update_input").val(result.inTime);
				$("#processedResultupdate_input").val(result.processedResult);
				$("#leaveTime_update_input").val(result.leaveTime);
				//authType//事由
				var authTypeValue="";
				if(result.authType=="0"){
					authTypeValue="采集信息";
				}else if(result.authType=="1"){
					authTypeValue="询问";
				}else if(result.authType=="2"){
					authTypeValue="采集信息+询问";
				}
				$("#authType_update_input").val(authTypeValue);
				/* $("input:radio[name='authType']").each(
				function(){
					if($(this).val()==result.authType){
						$(this).attr("checked",true);
					}
				}	 
				);*/
				//询问室
				$("#inquestRoomNo_update_input").val(result.roomInfo.roomName);
				//inquestRoomNo//询问室
				//禁止区域
				$("#banArea_update_input").val(result.banAreaNames);
				$("#bagNo_update_input").val(result.goodsInfo.bagNo);
				$("#cupboardNo_update_input").val(result.goodsInfo.cupboardNo);
				$("#recvPerson_update_input").val(result.goodsInfo.recvPerson);
				$("#recvTimeupdate_input").val(result.goodsInfo.recvTime);
				$("#goodsInfoupdate_input").val(result.goodsInfo.goodsInfo);
				$("#fillInNameupdate_input").val(result.fillInName);
				$("#suspectDetailModal").fadeIn(200);
			}
		
		});
		
	}
</script>
<script type="text/javascript">
//同案标记
$("#accompliceSign").click(function() {
	 
});
function bxwcklj(id) {
	var url = "${APP_PATH}/per/suspectInfo/checkSuspectPathView?suspectInfoGUID="+id; //转向网页的地址; 
	$.jBox.open(
	        "iframe:"+url, 
	        "被询问人员路径查看", 1000, 780, 
	        {id:'addTradeProject', 
	        	top: '50px',
	        	buttons: {"关闭":true}, 
	        	iframeScrolling: 'yes',
	        	showClose: true
	        }
	    ); 
	/* var name = 'add'; //网页名称，可为空; 
	var iWidth = 1000; //弹出窗口的宽度; 
	var iHeight = 700; //弹出窗口的高度; 
	//获得窗口的垂直位置 
	var iTop = (window.screen.availHeight - 30 - iHeight) / 2;
	//获得窗口的水平位置 
	var iLeft = (window.screen.availWidth - 10 - iWidth) / 2;
	window.open(url,name,'height='
							+ iHeight
							+ ',,innerHeight='
							+ iHeight
							+ ',width='
							+ iWidth
							+ ',innerWidth='
							+ iWidth
							+ ',top='
							+ iTop
							+ ',left='
							+ iLeft
							+ ',status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no');
 */
}
</script>
<style type="text/css">
/* 修饰页码*/
.disabled{
    cursor: not-allowed;
    background-color: #eee;
    opacity: 1;
    color: #737373 !important;
}
.disabled a{
color: #737373 !important;}
.textleft{
text-align: right;
padding-right:3px;
}
   .title{ 
    text-align: left !important;
    border-bottom: #999 1px solid;
    padding-top:0 !important; 
    height:15px !important; 
    }
     .title1{ 
    text-align: left !important;
    border-bottom: #999 1px solid;
    height:15px !important; 
    }
    .tipyuanxx{
     height:590px;
     width:910px;
    }
</style>
</head>
<body>
	<div class="place">
		<ul class="placeul">
			<li>被询问人历史信息查询</li>
		</ul>
	</div>
	<div class="rightinfo" >
			<form:form id="searchForm" modelAttribute="suspectInfo"
				action="${APP_PATH}/per/suspectInfo/list" method="post">
				<input id="isLeave" name="isLeave" type="hidden" value="1"/>
	    		<input id="pageNo" name="pageNo" type="hidden" />
	    		<input id="isHistoryFlg" name="isHistoryFlg" type="hidden" value="1"/>
				<div class="tools">
					姓名<input name="suspectName" type="text" maxlength="10" value="${suspectInfo.suspectName}"/> 
					身份证号<input name="suspectIDNo" type="text" maxlength="30" value="${suspectInfo.suspectIDNo}"/> 
					时间<input name="inTime" type="text" maxlength="20" value="${suspectInfo.inTime}" class="input-medium Wdate required" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/> 
					<img src="${APP_PATH}/static2/images/chaxun.jpg" width="75" height="35"
						style="vertical-align: middle" onclick="to_page(1)" />
					<div style="width: 100; height: 50; background-color: #000"></div>
				</div>
			</form:form>
			<table class="imgtable" id="list">
				<tr class="imgtable1">
					<th width="60px;">序号</th>
					<th width="60px;">选择</th>
					<th>姓名</th>
					<th>性别</th>
					<th>询问室</th>
					<th>登记时间</th>
					<th>携带民警</th>
					<th>确认离开</th>
				</tr>
							<c:forEach items="${pageInfo.list}" var="suspectInfo" varStatus="pageList">
				<tr>
				    <td>${(pageInfo.pageNum - 1) * pageInfo.pageSize + pageList.index + 1}</td>
					<td class="imgtd"><input type="checkbox"
						name="suspectCheckbox" dataId="${suspectInfo.infoGUID}"></td>
					<td>${suspectInfo.suspectName}</td>
					<td>${suspectInfo.suspectSex}</td>
					<td>${suspectInfo.roomInfo.roomName}</td>
					<td>${suspectInfo.inTime}</td>
					<td>${suspectInfo.bringPolice}</td>
					<td>
					<input name="button" type="button" class="btn" id="button" onclick="showSuspectInfoDetail('${suspectInfo.infoGUID}')"
						value="详细信息" /> 
						<input name="button" type="button" class="btn"
						id="button" onclick="bxwcklj('${suspectInfo.infoGUID}')" value="查看路径" /></td>
				</tr>
			</c:forEach>
			</table>
			<div class="pagin">
				<div class="message">
				当前显示第&nbsp;<i class="blue">${pageInfo.pageNum}&nbsp;</i>页,共<i class="blue">${pageInfo.pages}</i>页,共<i class="blue">${pageInfo.total}</i>条记录，
			     </div>
				<ul id="pageInfoId" class="paginList">
					<li class="paginItem"><a href="javascript:;"><span
							class="pagepre"></span></a></li>
					<li class="paginItem"><a href="javascript:;">1</a></li>
					<li class="paginItem current"><a href="javascript:;">2</a></li>
					<li class="paginItem"><a href="javascript:;">3</a></li>
					<li class="paginItem"><a href="javascript:;">4</a></li>
					<li class="paginItem"><a href="javascript:;">5</a></li>
					<li class="paginItem more"><a href="javascript:;">...</a></li>
					<li class="paginItem"><a href="javascript:;">10</a></li>
					<li class="paginItem"><a href="javascript:;"><span
							class="pagenxt"></span></a></li>
				</ul>
			</div>
			<div class="tipyuanxx" id="suspectDetailModal">
				<div class="tiptop">
					<span>被询问人详细信息</span><a></a>
				</div>
				<div style="height:20px"></div>
				<form>
				<table width="820" border="1" class="zdgl" style="margin: auto">
					<tr>
						<td colspan="12" class="title">基本信息：</td>
					</tr>
					<tr>
						<td class="textleft">姓名</td>
						<td colspan="2"><input name="suspectName" type="text" readonly="readonly" id="suspectName_update_input"/></td>
						<td class="textleft">性别</td>
						<td colspan="2"><input name="suspectSex" type="text" readonly="readonly" id="suspectSex_update_input"/></td>
						<td class="textleft">出生年月</td>
						<td colspan="2" ><input name="suspectBirth" type="text" readonly="readonly" id="suspectBirth_update_input"/></td>
						<td class="textleft">身份证号</td>
						<td colspan="2"><input name="suspectIDNo" type="text" readonly="readonly" id="suspectIDNo_update_input"/></td>
					</tr>
					 <tr>
						<td class="textleft">户籍地</td>
						<td colspan="5" ><input name="suspectArea" type="text"
							style="width: 313px" readonly="readonly" id="suspectArea_update_input"/>
						</td>
						<td class="textleft">文化程度</td>
						<td colspan="2">
							<input name="suspectDegree" type="text" readonly="readonly"  id="suspectDegree_update_input"/>
						</td>
						<td class="textleft">国籍</td>
						<td colspan="2"><input name="suspectNationality" type="text" readonly="readonly"  id="suspectNationality_update_input"/></td>
											</tr>
					<tr>
						<td class="textleft">住址</td>
						<td colspan="5"><input name="suspectAddress" type="text"
							style="width: 313px" readonly="readonly"  id="suspectAddress_update_input"/></td>
						<td class="textleft">户籍地<br>行政区划</td>
						<td colspan="2"><input name="suspectPlace" type="text" readonly="readonly"  id="suspectPlace_update_input" /></td>
						<td class="textleft">联系方式</td>
						<td colspan="2"><input name="suspectTel" type="text" readonly="readonly" id="suspectTel_update_input" /></td>
					
					 </tr>
					<tr>
						<td class="textleft">登记时间</td>
						<td colspan="2"><input name="inTime" type="text" readonly="readonly" id="inTime_update_input"/></td>
						<td class="textleft">离开时间</td>
						<td colspan="2"><input name="leaveTime" type="text" readonly="readonly" id="leaveTime_update_input"/></td>
						<td class="textleft">带离警员</td>
						<td colspan="2"><input name="leaveBringName" type="text" readonly="readonly" id="bringPolice_update_input"/></td>
						<td class="textleft">处理结果</td>
						<td colspan="2"><input name="processedResult" type="text" readonly="readonly"  id="processedResultupdate_input"/></td>
					</tr>
					<tr>
						<td class="textleft">填表人</td>
						<td colspan="11"><input name="fillInName" type="text" readonly="readonly" id="fillInNameupdate_input"/></td>
					</tr>
					 <tr>
						<td colspan="12" class="title">体貌特征：</td>
					</tr>
					<tr>
						<td class="textleft">身高</td>
						<td colspan="2"><input name="suspectStature" type="text" readonly="readonly" id="suspectStature_update_input"/></td>
						<td class="textleft">脸型</td>
						<td colspan="2"><input name="facelFeature" type="text" readonly="readonly"  id="facelFeature_update_input"/></td>
						<td class="textleft">体型</td>
						<td colspan="2"><input name="shapelFeature" type="text" readonly="readonly" id="shapelFeature_update_input"/></td>
						<td class="textleft">血型</td>
						<td colspan="2"><input name="bloodType" type="text" readonly="readonly" id="bloodType_update_input"/></td>
					</tr>
					<tr>
						<td class="textleft">特殊特征</td>
						<td colspan="5"><input name="specialFeature" type="text"
							style="width: 313px" readonly="readonly" id="specialFeature_update_input"/></td>
						<td class="textleft">可疑依据</td>
						<td colspan="2"><input name="supspocious" type="text" readonly="readonly" id="supspocious_update_input"/></td>
						<td class="textleft">备注</td>
						<td colspan="2"><input name="suspectRemark" type="text"
							 readonly="readonly" id="suspectRemark_update_input"/></td>
					</tr>
					<tr>
					<td colspan="12" class="title1">发卡：</td>
					</tr>
					<tr>
					<td class="textleft">事由</td>
						<td colspan="2">
							<input name="authType" type="text" readonly="readonly"  id="authType_update_input"/>
						</td>
						<td class="textleft"><span class="kv-content">询问室</span></td>
						<td colspan="2">
						<input name="inquestRoomNo" type="text" readonly="readonly" id="inquestRoomNo_update_input"/>
						</td>
						<td colspan="6"></td>
					</tr> 
				<tr>
						<td class="textleft">允许区域</td>
						<td colspan="11">
							<textarea name="banArea"  readonly="readonly" id="banArea_update_input" 
								cols=""
								rows=""
								style="width: 308px; height: 50px; background-color: #e2f3ff"></textarea>
						</td>
		   		 </tr>
				 <tr>
						<td colspan="12" class="title1">物品管理：</td>
					</tr>
					<tr>
						<td class="textleft">自封袋号</td>
						<td colspan="2"><input name="goodsInfo.bagNo" type="text" readonly="readonly" id="bagNo_update_input"/></td>
						<td class="textleft">储物柜号</td>
						<td colspan="2"><input name="goodsInfo.cupboardNo" type="text" readonly="readonly" id="cupboardNo_update_input"/></td>
						<td class="textleft">接收人</td>
						<td colspan="2"><input name="goodsInfo.recvPerson" type="text" readonly="readonly" id="recvPerson_update_input"/></td>
						<td class="textleft">接收时间</td>
						<td colspan="2"><input name="goodsInfo.recvTime" type="text" id="recvTimeupdate_input" readonly="readonly" /></td>
					</tr>
					<tr>
						<td class="textleft">物品内容</td>
						<td colspan="5">
						<textarea name="goodsInfo.goodsInfo"  readonly="readonly" id="goodsInfoupdate_input" cols=""
								rows=""
								style="width: 313px; height: 50px; background-color: #e2f3ff"></textarea>
								</td>
						<td colspan="6"></td>
					</tr>
				</table>
				</form>
			</div>
</body>

</html>
